<template>
  <div>
    <!-- 面包屑 -->
    <div class="home-breadcrumb">
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item >知识图库</el-breadcrumb-item>
        <el-breadcrumb-item >专家知识库概览</el-breadcrumb-item>
        <el-breadcrumb-item >生产工艺</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <div class="manufacture-container">
      <div class="manufacture-title">
        <div class="title-sty">
          <span class="icon-wrapper">
            <i class="iconfont">&#xe656;</i>
          </span>
          <span class="title">中医制药生产工艺知识</span>
        </div>
        <router-link to="/konwledgeGraph/productprocess/producteadd/1">
          <el-button type="primary">新增知识</el-button>
        </router-link>
      </div>

      <div class="manufacture-line" v-for="items in this.KMaintainList" :key="items.lable">
        <div class="manufacture-item-figure">
          <span>{{items.lable}}</span>
        </div>
        <div class="manufacture-item-link">
          <div v-for="item in items.list" :key="item.kid" >
            <router-link :to="'/konwledgeGraph/productprocess/productdetil/'+item.kid+'/'+item.kname" type="a">{{item.kname}}</router-link>
          </div>
        </div>
      </div>


    </div>
  </div>
</template>

<script>
  import KMaintainApi from '@/api/kMaintainApi'
export default {
  // 生产工艺
  name: "Manufacturing",
  data(){
    return{
      // 生产工艺list
      KMaintainList:[],
      // 分页
      pageInfo:{
        // pageNo:1,
        pageSize:100,
        currentPage: 1,
        count:0
      },
    }
  },
  created() {
    // 获取list
    KMaintainApi.kMaintainList(this.pageInfo,1).then(res => {
      if(res.data.status === "200"){
        this.KMaintainList = res.data.data
      }
    })
  }
};
</script>
<style scoped lang="less">
.manufacture-container {
  display: flex;
  flex-direction: column;
  background-color: #FFFFFF;
  padding: 20px;
  border-radius: 5px;
  .manufacture-title {
    font-size: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .icon-wrapper {
      display: inline-block;
      // color: #FFFFFF;
      // font-size: 50px;
      margin-right: 10px;
      .iconfont {
        font-size: 20px;
      }
    }
  }
  .manufacture-item-figure {
    margin-top: 30px;

    span {
      display: inline-block;
      height: 23px;
      width: 33px;
      line-height: 23px;
      text-align: center;
      border-radius: 5px;
      color: white;
      background: #ffcc00;
    }
  }
  .manufacture-item-link {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
    div {
      margin-right: 30px;
      a {
        color: #007aff;
        text-decoration: none;
      }
    }
  }
}
.title-sty{
  display: flex;
}
</style>
